package WORKPLACE;

import java.net.InetAddress;
import java.net.UnknownHostException;

import com.google.gson.Gson;

public class test001_URLapi {

	public static void main(String[] args) {
		String IPaddr="192.168.1.1";
		try {
			InetAddress addr = InetAddress.getLocalHost();
			IPaddr=addr.getHostAddress();
		} catch (UnknownHostException e1) {
			;
		}
		URLapi aa=new URLapi();
//		IPaddr="10.130.1.1";
//		System.out.println(IPaddr);
		aa.RESTInvoker("http://10.130.0.231:8092", "","");
		Gson gson=new Gson();
		m_postOrder order=new m_postOrder();
		order.order_no="11111111123456";
		order.part_no="1.00.01.1111-00";
		order.product_name="stest";
		order.qty="1010";
		order.bin="101";
		String ijson=gson.toJson(order);
		String str=aa.postDataToServer("/actionapi/Ordermanager/Addorder", ijson);

		System.out.println(str);
		
	}

}
